home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / bash / bash-108 / bash-108.zoo / readline / Makefile.cross < prev    next >
Encoding:
Makefile  |  1991-08-22  |  2.4 KB  |  86 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for readline and history libraries.               #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Here is a rule for making .o files from .c files that doesn't force
  8. # the type of the machine (like -sun3) into the flags.
  9. .c.o:
  10.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
  11.  
  12. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  13. # a return type of "void" for signal handlers.
  14. TYPES = -DVOID_SIGHANDLER
  15.  
  16. # Define USG as -DUSG if you are using a System V operating system.
  17. #USG = -DUSG
  18.  
  19. # HP-UX compilation requires the BSD library.
  20. #LOCAL_LIBS = -lBSD
  21.  
  22. # Xenix compilation requires -ldir -lx
  23. #LOCAL_LIBS = -ldir -lx
  24.  
  25. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  26. # the vi line editing mode and features.
  27. READLINE_DEFINES = $(TYPES) # -DVI_MODE
  28.  
  29. DEBUG_FLAGS = 
  30. LDFLAGS = $(DEBUG_FLAGS) 
  31. CFLAGS  = $(DEBUG_FLAGS) $(USG) -I.
  32.  
  33. # A good alternative is gcc -traditional.
  34. CC = cgcc -O -fstrength-reduce
  35.  
  36. RANLIB = car -s
  37. AR = car
  38. RM = rm
  39.  
  40. LOCAL_INCLUDES = -I../
  41.  
  42. CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
  43.        emacs_keymap.c vi_keymap.c
  44.  
  45. HSOURCES = readline.h chardefs.h history.h keymaps.h
  46. SOURCES  = $(CSOURCES) $(HSOURCES)
  47.  
  48.  
  49. ##########################################################################
  50.  
  51. all: readline.olb
  52.  
  53. readline.olb:    readline.o history.o funmap.o keymaps.o
  54.     $(RM) -f readline.olb
  55.     $(AR) cls readline.olb readline.o history.o funmap.o keymaps.o
  56.  
  57. readline.o:    readline.c readline.h chardefs.h  keymaps.h history.h vi_mode.c
  58.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  59.       $(LOCAL_INCLUDES) $*.c
  60.  
  61. history.o:    history.c history.h
  62.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  63.       $(LOCAL_INCLUDES) $*.c
  64.  
  65. funmap.o:    funmap.c readline.h
  66.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  67.       $(LOCAL_INCLUDES) $*.c
  68.  
  69. keymaps.o:    keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h
  70.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  71.       $(LOCAL_INCLUDES) $*.c
  72.  
  73. # The rule for 'includes' is written funny so that the if statement
  74. # always returns TRUE unless there really was an error installing the
  75. # include files.
  76. includes:
  77.     if [ -r $(INCDIR)/readline ]; then \
  78.       :; \
  79.     else \
  80.       mkdir $(INCDIR)/readline && chmod a+r $(INCDIR)/readline; \
  81.     fi
  82.     $(CP) readline.h keymaps.h chardefs.h $(INCDIR)/readline/
  83. clean:
  84.     rm -f *.o *.a
  85.     (cd doc; make clean)
  86.